﻿using EntityFrameworkSample.DB.Model;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityFrameworkSample.DB
{
    public class BlogContext: DbContext
    {
        public BlogContext()
            :base("BlogContextDB")
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }

        public DbSet<Blog> Blogs { get; set; }

        public DbSet<ContentType> ContentTypes { get; set; }
    }
}
